package com.hsomandroidapp.list;

import android.graphics.Paint;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;

import com.hsomandroidapp.R;
import com.hsomandroidapp.base.ImageLoadTask;

public class ProductItemViewHolder {
	
	public TextView contentTextView;
	public TextView priceTextView;
	public TextView realPriceTextView;
	public ImageButton buyButton;
	public ImageButton addCartButton;
	public ImageView productImage;
	public ImageLoadTask loadTask;

	public ProductItemViewHolder(View view){
		contentTextView  = (TextView)view.findViewById(R.id.tv_product_info);
		priceTextView  = (TextView)view.findViewById(R.id.tv_price);
		priceTextView.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG); 
		realPriceTextView  = (TextView)view.findViewById(R.id.tv_real_price);
		buyButton= (ImageButton)view.findViewById(R.id.btn_buy);
		addCartButton= (ImageButton)view.findViewById(R.id.btn_addcart);
		productImage = (ImageView)view.findViewById(R.id.iv_head_image);
	}
	
	public void reset(){}
	public void recycle() {
		if (this.loadTask != null)
			this.loadTask.cancel(true);
		 this.loadTask = null;
	}
}
